<div>
  {{include file="admin/gui/basetoolbar.tpl"}}
</div>
<table width="100%">
  <tr>
    <td style="vertical-align: top">{{include file="admin/gui/basemenu.tpl"}}</td>
    <td>
      <textarea id="{{$t|escape:'html'}}_content" name="{{$t|escape:'html'}}_content" rows="15" cols="80" style="width: 1024px; height:700px"></textarea>
    </td>
    <td width="300px" style="vertical-align: top;">
      <table width="300px" style="margin-left: 10px;border: thick solid #cccccc" cellPadding="5">
        <tr>
          <td style="font-weight: bold;">Action</td>
        </tr>
        <tr>
          <td>
            <input id="{{$t|escape:'html'}}_save" type="button" value="{{t escape='html'}}Save{{/t}}"></input>
            <input id="{{$t|escape:'html'}}_preview" type="button" value="Preview"></input>
            <input id="{{$t|escape:'html'}}_remove" type="button" value="Delete"></input>
          </td>
        </tr>
      </table>
    </td>
    <td width="100%"></td>
  <tr>
  <tr>
    <td colSpan="4">
      <div style="margin: 10px 0;padding: 5px 0;background-color: #cccccc;">
        <span style="font-weight: bold;margin-right: 20px;margin-left: 200px;">New Plugin</span>
        <select id="{{$t|escape:'html'}}_plugins"/>
        <input id="{{$t|escape:'html'}}_plugin_add" type="button" value="Quick Add"></input>
        <input id="{{$t|escape:'html'}}_plugin_browse" type="button" value="Browse"></input>
      </div>
    </td>
  </tr>
  <tr>
    <td></td>
    <td colSpan="2">
      <script type="text/javascript">
        <!--
          function updateHeight() {
            iframe = document.getElementById('{{$t|escape:'html'}}_instances');
            var boh = iframe.contentDocument.body.offsetHeight;
            var bsh = iframe.contentDocument.body.scrollHeight;
            iframe.height = Math.max(Math.max(boh, bsh) + 100, 300);
//            iframe.height = Math.max(boh + 100, 300);
          }
        // -->
      </script>
      <iframe id="{{$t|escape:'html'}}_instances" onload="Javascript:updateHeight();" scrolling="no" width="100%" frameborder="0"  marginwidth="0" marginheight="0" src="adminmodule.php?t=instances&m={{$menu_id|escape:'html'}}"></iframe>
    </td>
    <td></td>
  </tr>
</table>

{{*/* Javascript */*}}

<script type="text/javascript" src="libs/tiny_mce/tiny_mce.js"></script>
<script src="jsrequest.php?script={{$t|escape:'html'}}" type="text/javascript"></script>
<script type="text/javascript">
  <!--
    if (document.addEventListener) {
      document.addEventListener('DOMContentLoaded', init, false);
    }
    window.onload = init;

    function init() {
      if (!document.getElementById || !document.createElement || !arguments || arguments.callee._loaded) {
        return;
      }
      arguments.callee._loaded = true;
      var gui = Api_Page.gui('{{$t|escape:'javascript'}}');
      new Html_Page(gui, JSON.parse('{{$u|escape:javascript}}'), JSON.parse('{{$d|escape:javascript}}'), JSON.parse('{{$opts|escape:javascript}}'), JSON.parse('{{$msg|escape:javascript}}'));
    }
  // -->
</script>
